import React from "react";

// const App = () => {
//     console.log(this);
//     return <div>你猜可以不可以</div>;
// };
// 函数组件没有this, props通过参数传递
function App(props) {
    return <div>{props.children}</div>;
}

class Son extends React.Component {
    render() {
        return (
            <div>
                son
                <div>{this.props.children}</div>
                footer
            </div>
        );
    }
}

class AppClass extends React.Component {
    render() {
        return (
            <div>
                <Son>
                    <div>小黑</div>
                    <div>18</div>
                </Son>
                <App>
                    <div>小白</div>
                    <div>81</div>
                </App>
            </div>
        );
    }
}

export default AppClass;
